The invention relates to the correction of errors in received data, more specifically received binary data. Thus, for example, the invention can be applied to decode error correction codes and so correct the received data, and makes use of soft decision and maximum likelihood decoding (correcting up to a given number of errors). It employs a fast algorithm to be described in detail below.